Follow = {
	follow:function(idolId,idolNickname,idolPortrait,idolType,input,successBack,redirectUrl) {
			var data = "idolId="+idolId+"&idolNickname="+idolNickname+"&idolPortrait="+idolPortrait+"&idolType="+idolType;
			doAjax("/skyline/follow.html",data,function(ret){
				if(ret.logined) {
					if(ret.success) {
						successBack(input);
					} else {
						alert(ret.errmsg);
					}
				} else {
					alert("您的操作已超时，请重新登录");
					window.location=SKYLINE_DOMAIN+'/login.html?requestFrom='+redirectUrl;
				}
			});
		},

	unfollow:function(idolId,idolType,input,successBack,redirectUrl) {
			var data = "idolType="+idolType;
			doAjax("/skyline/unfollow/"+idolId+".html",data,function(ret){
				if(ret.logined) {
					if(ret.success) {
						successBack(input);
					} else {
						alert(ret.errmsg);
					}
				} else {
					alert("您的操作已超时，请重新登录");
					window.location=SKYLINE_DOMAIN+'/login.html?requestFrom='+redirectUrl;
				}
			});
		}
		
//	this.isIdol=function(id,nickname,portrait,type){
//			idolId=id;
//			idolNickname=nickname;
//			idolPortrait=portrait;
//			idolType=type;
//			
//			$.ajax({
//				url:"/skyline/isIdol.html",
//				type:"POST",
//				data:"idolId="+idolId + "&idolType=" + idolType,
//				dataType:"json",
//				contentType : "application/x-www-form-urlencoded; charset=utf-8",
//				success : function(msg) {
//					var obj = msg;
//					if (obj == null) {
//					// ajaxLogin();
//					} else {
//						if(obj.UserStatus==true){
//							if(obj.IsFanFlag){
//								document.getElementById(idolId+"_attention").value="取消关注";
//								document.getElementById(idolId+"_attention").onclick=Attention.ajaxDelattention;
//							}
//							else{
//								document.getElementById(idolId+"_attention").value="关注";
//								document.getElementById(idolId+"_attention").onclick=Attention.ajaxPayattention;
//							}
//						}
//						else if(obj.UserStatus==false){
//							document.getElementById(idolId+"_attention").value="关注";
//							document.getElementById(idolId+"_attention").onclick=ajaxLogin;
//						}	else if(obj.UserStatus=="Me")	{
//							document.getElementById(idolId+"_attention").type="hidden";
//						}
//					}
//				}
//			});
//		}
};



